import EditDialog from './index.vue'
import { ref } from 'vue'

export default EditDialog

export const usePermissionDialog = () => {
  const ctx = ref<typeof EditDialog>()
  const register = (vm: typeof EditDialog) => {
    ctx.value = vm.ctx
  }
  return {
    open: (...args) => {
      ctx.value?.open(...args)
    },
    close: (...args) => {
      ctx.value?.close(...args)
    },
    register,
  }
}
